package com.aos.erp.manager.enums.review;

import com.baomidou.mybatisplus.core.enums.IEnum;

import java.io.Serializable;

/**
 * 导入导出文件类型
 */
public enum ExportFileType implements IEnum {
    all(-1,""),
    normal(0,""),
    sfz(1,"身份证头像"),
    mqb(2,"互联网面签协议"),
    cxjs(3,"初学驾驶申请表"),
    zjjs(4,"增驾驾驶申请表"),
    zw(5,"指纹"),
    ljz(6,"原驾驶证"),
    zzz(7,"制证照"),
    pxjl(8,"培训记录"),
    xszm(9,"学时证明"),
    zzpermit(10,"居住证照片"),
    idz(11,"身份证正面"),
    idf(12,"身份证反面"),
    healthForm(13,"体检表"),
    scenePhotos(14,"现场照片"),
    zjzo(15,"证件照"),
    tjbtp(16,"提交表图片"),
    sfzdzz(17,"身份证电子照片"),
    zcbmqz(18,"注册表面签照");

    private int value;
    private String desc;

    ExportFileType(final int value, final String desc) {
        this.value = value;
        this.desc = desc;
    }

    @Override
    public Serializable getValue() {
        return this.value;
    }


    public String getDesc() {
        return this.desc;
    }

    public static ExportFileType getFileType(int value) {
        ExportFileType fileType = normal;
        if(sfz.value == value) {
            fileType = sfz;
        } else if(mqb.value == value) {
            fileType = mqb;
        } else if(cxjs.value == value) {
            fileType = cxjs;
        } else if(zjjs.value == value) {
            fileType = zjjs;
        } else if(zw.value == value) {
            fileType = zw;
        } else if(ljz.value == value) {
            fileType = ljz;
        } else if(zzz.value == value) {
            fileType = zzz;
        } else if(pxjl.value == value) {
            fileType = pxjl;
        } else if(xszm.value == value) {
            fileType = xszm;
        } else if(zzpermit.value == value) {
            fileType = zzpermit;
        } else if(idz.value == value) {
            fileType = idz;
        } else if(idf.value == value) {
            fileType = idf;
        } else if(healthForm.value == value) {
            fileType = healthForm;
        } else if(scenePhotos.value == value) {
            fileType = scenePhotos;
        } else if(zjzo.value == value) {
            fileType = zjzo;
        } else if(tjbtp.value == value) {
            fileType = tjbtp;
        } else if(sfzdzz.value == value) {
            fileType = sfzdzz;
        } else if(zcbmqz.value == value) {
            fileType = zcbmqz;
        }
        return fileType;
    }

    public static ExportFileType getFileType(String desc) {
        ExportFileType fileType = normal;
        if(sfz.desc.equals(desc)) {
            fileType = sfz;
        } else if(mqb.desc.equals(desc)) {
            fileType = mqb;
        } else if(cxjs.desc.equals(desc)) {
            fileType = cxjs;
        } else if(zjjs.desc.equals(desc)) {
            fileType = zjjs;
        } else if(zw.desc.equals(desc)) {
            fileType = zw;
        } else if(ljz.desc.equals(desc)) {
            fileType = ljz;
        } else if(zzz.desc.equals(desc)) {
            fileType = zzz;
        } else if(pxjl.desc.equals(desc)) {
            fileType = pxjl;
        } else if(xszm.desc.equals(desc)) {
            fileType = xszm;
        } else if(zzpermit.desc.equals(desc)) {
            fileType = zzpermit;
        } else if(idz.desc.equals(desc)) {
            fileType = idz;
        } else if(idf.desc.equals(desc)) {
            fileType = idf;
        } else if(healthForm.desc.equals(desc)) {
            fileType = healthForm;
        } else if(scenePhotos.desc.equals(desc)) {
            fileType = scenePhotos;
        } else if(zjzo.desc.equals(desc)) {
            fileType = zjzo;
        } else if(tjbtp.desc.equals(desc)) {
            fileType = tjbtp;
        } else if(sfzdzz.desc.equals(desc)) {
            fileType = sfzdzz;
        } else if(zcbmqz.desc.equals(desc)) {
            fileType = zcbmqz;
        }
        return fileType;
    }
}
